//
//  ViewController.m
//  ADRollingView
//
//  Created by 美鑫科技 on 16/6/21.
//  Copyright © 2016年 MorpLCP. All rights reserved.
//

#import "ViewController.h"
#import "ADRollingView.h"

@interface ViewController ()<ADRollingViewDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    ADRollingView *adView = [[ADRollingView alloc] initWithTitles:@[@"呵呵",@"嘻嘻"] Frame:CGRectMake(0, 64, self.view.frame.size.width, 40)];
    adView.delegate = self;
    [self.view addSubview:adView];
    
//    ADRollingView *adView = [[ADRollingView alloc] initWithIcons:@[@"http://imgsrc.baidu.com/forum/pic/item/b64543a98226cffc8568eff1b9014a90f603ea37.jpg", @"http://imgm.photophoto.cn/086/029/025/0290250043.jpg"] Titles:@[@"嘿嘿", @"嘻嘻"] Frame:CGRectMake(0, 64, self.view.frame.size.width, 40)];
//    adView.delegate = self;
//    [self.view addSubview:adView];
}

- (void)rollingView:(ADRollingView *)rollingView didSelectIndex:(NSInteger)index{
    NSLog(@"%ld", index);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
